import { App } from 'vue'
import Message from './message/message'
// import skeleton from './skeleton/skeleton.vue'
// import carousel from './carousel/carousel.vue'
// import more from './more/more.vue'

const customGlobComponents = import.meta.globEager('../components/*/*.vue')

// export default {
//   install(app: App) {
//     app.component(skeleton.name, skeleton)
//     app.component(carousel.name, carousel)
//     app.component(more.name, more)
//   }
// }

export default (app: App) => {
  for (const path in customGlobComponents) {
    const mod = customGlobComponents[path]
    app.component(mod.default.name, mod.default)
  }
  app.config.globalProperties.$message = Message
}
